﻿@{
    ViewBag.Title = "Change Profile";
}

@model EagleProject.LinQDataContext.CommonUser

<h2>Change Profile</h2>

@using (Html.BeginForm("ChangeProfile", "User", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Change Profile</legend>
        <ol>
            <li>
                <div class="tbl-first">Avatar</div>
                <div class="tbl-next">
                    @if (Model.PictureUrl != null)
                    {  
                        <img src="@Url.Content(Model.PictureUrl)"/>
                    }
                    else
                    { 
                        <a>Avatar not set !</a>
                    }
                </div>
                <div class="tbl-next">
                </div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">New Avatar</div>
                <div class="tbl-next">
                    <input type="file" name="file" />
                </div>
                <div class="tbl-next">
                </div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>
    <input type="submit" class="btn" name="Submit" id="Submit" value="Submit" />
}

